package D;


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();
        int sum = 0;
        //如何优化这段代码的时间复杂度
        for (int i = a; i <= b; i++) {
            for (int j = c; j <= d; j++) {
                if (i / j == 0) {
                    break;
                }
                //如果能够除尽 //那么i的倍数都是可以的
                if (i % j == 0 && i / j >= 1) {

                }
            }
        }
        System.out.println(sum);
    }
}
